package com.sd365.permission.centre.service;

import com.sd365.permission.centre.entity.Company;
import com.sd365.permission.centre.pojo.dto.CompanyDTO;
import com.sd365.permission.centre.pojo.query.CompanyQuery;
import com.sd365.permission.centre.pojo.query.IdVersionQuery;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * @Author jxd
 * @Date 2020/12/12  12:56 下午
 * @Version 1.0
 * @Write For CompanyService
 * @Email waniiu@126.com
 */
public interface CompanyService {

    List<Company> commonQuery(CompanyQuery companyQuery);

    Boolean add(@RequestBody @Valid CompanyDTO companyDTO);

    Boolean remove(Long id, Long version);

    /**
     * 批量删除Company
     *
     * @param idVersionQueryList Company批量删除列表
     * @return
     * @author Yan Huazhi
     * @date 2020/12/15 21:29
     * @version 0.0.1
     */
    Boolean removeBatch(List<IdVersionQuery> idVersionQueryList);

    /**
     * @param:
     * @return:
     * @see
     * @since
     */
    @Transactional
    Boolean modify(CompanyDTO companyDTO);

    /**
     * @param companyDTO
     * @return
     * @author LSL
     * @date 2020/12/17 10:28
     * @version 0.0.1
     */
    @Transactional
    Boolean batchModify(CompanyDTO companyDTO);

    CompanyDTO queryById(Long id);

    /**
     * 拷贝company记录
     * @author Yan Huazhi
     * @date 2020/12/17 13:02 
     * @version 0.0.1
     * @param id 公司id
     * @return CompanyDTO
     */
    CompanyDTO copy(Long id);
}
